import { defineConfig } from 'vite'
import react from '@vitejs/plugin-react-swc'

import { resolve } from 'path'

// https://vite.dev/config/
export default defineConfig({
  plugins: [react()],
  server: {
    host: '0.0.0.0',//解决vite use--host to expose
    port: 3000,//配置端口
    open: true,//配置默认打开浏览器
  },
  resolve: {
    // 配置路径别名
    alias: {
      '@': resolve('src')
    },
  },
  
})
